package com.cloudkinto.service.fbaorderoutput;

import com.baomidou.mybatisplus.extension.service.IService;
import com.cloudkinto.common.web.PageResult;
import com.cloudkinto.common.web.SingleResult;
import com.cloudkinto.entity.FbaOrderOutputDo;
import com.cloudkinto.extentity.stock.PickupStockRackDto;
import com.cloudkinto.service.fbaorderoutput.vo.*;
import com.cloudkinto.service.orderoutput.vo.*;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.List;
import java.util.Map;

/**
 * <p>
 * service接口
 * </p>
 *
 * @author 张永远
 * @since 2020-06-04
 */
public interface FbaOrderOutputService extends IService<FbaOrderOutputDo> {

    SingleResult addInit(Long currentUserId, Long companyId);

    String fbaStorageAdd(FbaOrderOutputAddReq req, Long userId);

    SingleResult setCost(Long id, double fee, Long userId);

    List<Map> computationalCosts(FbaOrderOutputComputationalCostsReq req, Long companyId);

    SingleResult updateInit(Long id,Long companyId);

    FbaOrderOutputUpdateReq update(FbaOrderOutputUpdateReq updateVo, Long userId);

    void appointmentStorageTime(FbaOrderOutputUpdateTimeReq req,Long currentUserId);

    void appointmentCarTime(FbaOrderOutputUpdateTimeReq req, Long currentUserId);

//    void cutoff(Long id, Long userId);

    int delete(Long id, Long userId);

    FbaOrderOutputDetailRes detail(Long id);

    SingleResult pageInit(Long companyId, Long currentUserId);

    List<FbaOrderOutputListRes> getList(Map<String, String> map);

    PageResult getListPage(Map<String, String> map);

    void exportExcel(Map<String, String> map, List<Long> ids, HttpServletResponse response) throws IOException;

    SingleResult updateTrackNumber(FbaOrderOutputUpdateTrackNumberReq req, Long userId);

    boolean back2Stock(Long id, String fee, String type, Long userId);

    OrderOutputUpdateTrackNumberRes updateTrackNumberInit(Long id, Long userId, Long companyId);

    void uploadSignatureFile(FbaOrderOutputUploadFileReq req, Long userId);

    void exportSkuTotal(Map<String, String> map, List<Long> ids, HttpServletResponse response);

    void exportPickExcel(Map<String, String> map, List<Long> ids, HttpServletResponse response);
    void exportPickExcelOne(Long id , HttpServletResponse response);

    void exportPickUp(List<Long> pickUpdIds, HttpServletResponse response);

    List<String> dealwithTrackNumberExcel(MultipartFile file, Integer storageId, Long userid);

    List<Map> uploadExcelInit(Long userid);

    void uploadTrackNumberData(List<String> excelImportList, int storageId, Long userid);

    void dealwithOrderSendOut(FbaOrderOutputDo outputDo, Long trackId, Long userId);

    SingleResult updateOrderWaitSend(Map<String, String> map, List<Long> ids, HttpServletResponse response);


    SingleResult exportTrackExpress(Map<String, String> map, List<Long> ids, HttpServletResponse
            response) throws IOException;

    SingleResult updateFbaStatusInit(Long orderId,Long currentUserId);

    boolean updateFbaStatus(String id, String status, String sysTips, Long currentUserId);

    List<FbaExcelImportPackageRes> importExcel(MultipartFile file, Long storageId, Long shopId,Long companyId) throws IOException;

    void copyData();

    void uploadSTrackFile(FbaOrderOutputUploadFileReq req, Long userId);

    List<BatchPickUpRes> batchPickUp(BatchPickUpReq req, Long userId, Long companyId);

    void fbaSortStockRackList(List<PickupStockRackDto> stockRackList, int finalGoodQuantity);

    List<FbaOrderFileResponse> exportOrderFbaFile(Long id, int type);
}
